<template>
    <div class = "Comment">
        <div class = "content-container">
            <textarea
            maxlength = "55"
            placeholder = "请输入"
            placeholder-style = "color: #999;font-size:28rpx;"
            v-model = "content"
            @input = "contentChange"
            ></textarea>
            <span>{{ contentLength }}/55</span>
        </div>
        <div :class = "contentLength ? 'submit' : 'submit disabled'">提交</div>
    </div>
</template>
<script>

export default {
    data(){
        return {
            content: "",
            contentLength: 0
        }
    },
    methods: {
        //更新长度
        contentChange(e){
            this.contentLength = this.content.length;
        }
    }
}
</script>
<style lang = "scss" scoped>
    @import "index.scss";
</style>
